{include file="index@public/header" /}
<style>
    .resetpwd{
        position:absolute;
        top:3em;
        width:80%;
        margin:10%;
        overflow: auto;
        height:600px;
    }
    .resetpwd a{
        position: absolute;
        color:#888;
        margin-left:1em;
        bottom:0em;
    }
</style>
<div class = "resetpwd">
    <form role="form" name = "myForm" ng-controller="valCtrl" novalidate>
        <div class="form-group">
            <label>YY号</label>
            <input type = "number" class = "form-control" ng-model="uid" name = "uid" required/>
            <p class = "help-block">请键入您的YY号</p>
        </div>
        <div class="form-group">
            <label>密保问题</label>
            <select class = "form-control" name = "mibao" required>
                <option value = "0" selected>您的爱好</option>
                <option value = "1">您母亲的姓名</option>
                <option value = "2">您最爱吃的食物</option>
            </select>
            <p class = "help-block">请选择你注册时候选择的问题</p>
        </div>
        <div class="form-group">
            <label>答案</label>
            <input class = "form-control" name = "mbdaan" ng-model="mbdaan" required/>
            <p class = "help-block">请输入答案</p>
        </div>
        <div class="form-group">
            <label>密码</label>
            <input type="password" class="form-control" name = "password" ng-model="password" placeholder="密码" maxlength = "12" minlength = "6" required/>
            <p class = "help-block" ng-hide="myForm.password.$dirty && myForm.password.$invalid">密码支持6-12位的数字、字符串</p>
            <span style="color:red" ng-show="myForm.password.$dirty && myForm.password.$invalid">
                <p ng-show="myForm.password.$error.required">密码是必需的</p>
                <p ng-show="myForm.password.$error.minlength">密码支持6-12位的数字、字符串</p>
            </span>
        </div>
        <div class="form-group">
            <label>确认密码</label>
            <input type="password" class="form-control" name = "againPwd" ng-model="againPwd" placeholder="确认密码" required/>
            <p class = "help-block" ng-hide="myForm.againPwd.$dirty">请再次输入您的密码</p>
            <span style="color: red" ng-show="myForm.againPwd.$dirty">
                <p ng-show="myForm.againPwd.$error.required">请确认您的密码</p>
                <span ng-show="myForm.againPwd.$valid && password != againPwd">两次密码输入不一致</span>
            </span>
        </div>
        <div class = "col-xs-12 text-center"><button type="submit" class = "btn btn-primary" ng-disabled="myForm.uid.$invalid || myForm.mbdaan.$invalid || myForm.againPwd.$invalid">确认提交</button><a href = "{:url('index/index/register')}">注册</a></div>
    </form>
</div>
<script type="text/javascript">
    app.controller('valCtrl', function($scope) {});
</script>
{include file="index@public/footer" /}